<template>
  <web-view :src="webUrl" v-if="webUrl"></web-view>
</template>

<script setup>
import { ref } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import sheep from "@/sheep";
import { udidName } from "@/sheep/config";

const to = ref("");
const mobile = ref("");
const webUrl = ref("");

onLoad((options) => {
  mobile.value = sheep.$store("user").userInfo.mobile;
  if (options.to) {
    to.value = options.to;
  }
  webUrl.value = `https://im-beta.shisan-xi.work/h5/index.html#/pages/im/index?mobile=${mobile.value}&udid=${udidName}&to=${to.value}&statusBarHeight=${sheep.$platform.device.statusBarHeight}`;
  uni.setStorageSync("AreYouIn", true);
});
</script>

<style></style>
